﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Simhopp.Common
{
    class DivingType
    {
        private String id;
        private List<int> height;
        private String typename;
        private List<double> pointsMultiplier;


        public String ID
        {
            get { return id; }
            set { id = value; }
        }


        public string TypeName
        {
            get { return typename; }
            set { typename = value; }
        }


        /// <summary>
        /// Get & Set method with copy.
        /// </summary>
        public List<int> Height
        {
            get { return height; }

            set
            {
                height.Clear();

                foreach (var Temp in value)
                {
                    height.Add(Temp);
                }
            }
        }



        /// <summary>
        /// Get & set method with copy.
        /// </summary>
        public List<double> DoublePointsMultiplier
        {
            get
            {
                return pointsMultiplier;
            }

            set
            {
                pointsMultiplier.Clear();

                foreach (var Temp in value)
                {
                    pointsMultiplier.Add(Temp);
                }
            }
        }


        /// <summary>
        /// Default constructor
        /// </summary>
        public DivingType()
        {
            id = "";
            height = new List<int>();
            typename = "";
            pointsMultiplier = new List<double>();
        }


        /// <summary>
        /// Constructor that takes parameters. Since both Height and Constant can have many values for a single type of jump, those variables has to be entered into diffrent functions.
        /// </summary>
        public DivingType(String ID, String TypeName)
        {
            this.id = ID;
            this.typename = TypeName;

            height = new List<int>();
            pointsMultiplier = new List<double>();
        }



        /// <summary>
        /// Adds a height to the list. 
        /// </summary>
        public void AddHeight(int NewHeight)
        {
            height.Add(NewHeight);
        }


        /// <summary>
        /// Adds a point multiplier to the list.
        /// </summary>
        public void AddMultiplier(double NewValue)
        {
            pointsMultiplier.Add(NewValue);
        }
    }
}

